import { createStore } from 'vuex'

export default createStore({
  state: {
    Collection: [],
  },
  getters: {},
  mutations: {
    // 收藏
    Collection(state, val) {
      state.Collection.push(val)
      localStorage.setItem('Shop', JSON.stringify(state.Collection))
    },
    remoColl(state) {
      state.Collection = []
      localStorage.removeItem('Shop')
    },
  },
  actions: {},
  modules: {},
})
